<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<%
String v = Math.random() + "";
request.setAttribute("v", v);
%>
<style>
.col-md-8 {
	
}
</style>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TechNews - HTML and CSS Template</title>
<!-- Bootstrap -->
<link href="/News/assets/css/bootstrap.min.css?v=${v }" rel="stylesheet">
<!-- Theme Style -->
<link href="/News/assets/css/style.css?v=${v }" rel="stylesheet">
</head>

<body id="page-top" data-spy="scroll" data-target=".navbar">
	<div id="main-wrapper">
		<!-- Page Preloader -->
		<div id="preloader">
			<div id="status">
				<div class="status-mes"></div>
			</div>
		</div>
		<!-- preloader -->

		<div class="uc-mobile-menu-pusher">
			<div class="content-wrapper">
				<section id="header_section_wrapper" class="header_section_wrapper">
					<div class="container">
						<div class="header-section">
							<div class="row">
								<div class="col-md-4">
									<div class="left_section">
										<span class="date"> </span>
										<!-- Date -->
										<span class="time"> </span>
										<!-- Time -->

										<!-- Top Social Section -->
									</div>
									<!-- Left Header Section -->
								</div>
								<div class="col-md-4">
									<div class="logo">
										<a href="#"><img src="assets/img/logo.png"
											alt="Tech NewsLogo" width="200px" height="50px"></a>
									</div>
									<!-- Logo Section -->
								</div>
								<div class="col-md-4">
									<div class="right_section">
										<ul class="nav navbar-nav">
											<li><a href="login.jsp">登录</a></li>
											<li><a href="register.jsp">注册</a></li>
										</ul>
										<!-- Language Section -->


										<!-- Search Section -->
									</div>
									<!-- Right Header Section -->
								</div>
							</div>
						</div>
						<!-- Header Section -->

						<div class="navigation-section">
							<nav class="navbar m-menu navbar-default">
								<div class="container">
									<!-- Brand and toggle get grouped for better mobile display -->
									<div class="navbar-header">
										<button type="button" class="navbar-toggle collapsed"
											data-toggle="collapse" data-target="#navbar-collapse-1">
											<span class="sr-only">Toggle navigation</span> <span
												class="icon-bar"></span> <span class="icon-bar"></span> <span
												class="icon-bar"></span>
										</button>
									</div>
									<!-- Collect the nav links, forms, and other content for toggling -->
									<div class="collapse navbar-collapse" id="#navbar-collapse-1">
										<ul class="nav navbar-nav main-nav">
											<li class="active"><a href="index.jsp">首页</a></li>
											<li><a href="/News/NewsCategoryServlet?newsType=移动设备">移动设备</a></li>
											<li><a href="/News/NewsCategoryServlet?newsType=平板电脑">平板电脑</a></li>
											<li><a href="/News/NewsCategoryServlet?newsType=产品">产品</a></li>
											<li><a href="/News/NewsCategoryServlet?newsType=照相机">照相机</a></li>
											<li><a href="/News/NewsCategoryServlet?newsType=设计">设计</a></li>
											<li><a href="/News/NewsCategoryServlet?newsType=其他">其他新闻</a></li>

										</ul>
									</div>
									<!-- .navbar-collapse -->
								</div>
								<!-- .container -->
							</nav>
							<!-- .nav -->
						</div>
						<!-- .navigation-section -->
					</div>
					<!-- .container -->
				</section>
				<!-- header_section_wrapper -->

				<section id="entity_section" class="entity_section">
					<div class="container">
						<div class="row">
							<div class="col-md-8">
								<div class="entity_wrapper">
									<div class="entity_title">
										<h1>
											<a
												href="/News/NewsSingleServlet?newsId=${singleMap.get('news').newsId}">${singleMap.get('news').newsHeadline}</a>
										</h1>
									</div>
									<!-- entity_title -->

									<div class="entity_meta">
										<a href="#" target="_self">${singleMap.get('news').newsDate}</a>,
										作者: <a href="#" target="_self">${singleMap.get('news').newsAuthor}</a>
									</div>
									<!-- entity_meta -->

									<div class="entity_rating">
										<i class="fa fa-star"></i> <i class="fa fa-star"></i> <i
											class="fa fa-star"></i> <i class="fa fa-star"></i> <i
											class="fa fa-star-half-full"></i>
									</div>
									<!-- entity_rating -->

									<div class="entity_social">
										<a href="#" class="icons-sm sh-ic"> <i
											class="fa fa-share-alt"></i> <b>${singleMap.get('news').newsHeat}</b>
											<span class="share_ic">分享</span>
										</a> <a href="#" class="icons-sm fb-ic"><i
											class="fa fa-facebook"></i></a>
										<!--Twitter-->
										<a href="#" class="icons-sm tw-ic"><i
											class="fa fa-twitter"></i></a>
										<!--Google +-->
										<a href="#" class="icons-sm inst-ic"><i
											class="fa fa-google-plus"> </i></a>
										<!--Linkedin-->
										<a href="#" class="icons-sm tmb-ic"><i class="fa fa-ge">
										</i></a>
										<!--Pinterest-->
										<a href="#" class="icons-sm rss-ic"><i class="fa fa-rss">
										</i></a>
									</div>
									<!-- entity_social -->

									<div class="entity_thumb">
										<img class="img-responsive"
											src="/News/assets/img/news/${singleMap.get('news').newsImg }"
											alt="feature-top">
									</div>
									<!-- entity_thumb -->

									<div class="entity_content">
										${singleMap.get('news').newsDetails}</div>
									<!-- entity_content -->

									<div class="entity_footer">
										<!-- entity_tag -->
										<div class="entity_social">
											<span><i class="fa fa-share-alt"></i>${singleMap.get('news').newsHeat}
												<a href="#">分享</a> </span> <span><i class="fa fa-comments-o"></i>${singleMap.get('news').newsReviewNum}
												<a href="#">评论</a> </span>
										</div>
										<!-- entity_social -->

									</div>
									<!-- entity_footer -->

								</div>
								<!-- entity_wrapper -->

								<div class="related_news">
									<div class="entity_inner__title header_purple">
										<h2>
											<a>相关新闻</a>
										</h2>
									</div>
									<!-- entity_title -->

									<div class="row">
										<c:forEach items="${singleMap.get('relatedNewsList')}"
											var="news">
											<div class="col-md-6">

												<div class="media">
													<div class="media-left">
														<a href="/News/NewsCategoryServlet?newsId=${news.newsId}"><img
															class="media-object"
															src="/News/assets/img/news/${news.newsImg }"
															alt="Generic placeholder image"></a>
													</div>
													<div class="media-body">
														<span class="tag purple"><a
															href="/News/NewsSingleServlet?newsType=移动设备"
															target="_self">移动设备</a></span>

														<h3 class="media-heading">
															<a href="/News/NewsCategoryServlet?newsId=${news.newsId}"
																target="_self">${news.newsIntro }</a>
														</h3>
														<span class="media-date"><a href="#">${news.newsDate }</a>,
															作者: <a href="#">${news.newsAuthor }</a></span>

														<div class="media_social">
															<span><a href="#"><i class="fa fa-share-alt"></i>${news.newsHeat }</a>
																分享</span> <span><a href="#"><i
																	class="fa fa-comments-o"></i>${news.newsReviewNum }</a> 评论</span>
														</div>
													</div>

												</div>

											</div>
										</c:forEach>
									</div>
								</div>
								<!-- Related news -->


								<!--Advertisement-->

								<div class="readers_comment">
									<div class="entity_inner__title header_purple">
										<h2>读者评论</h2>
									</div>
									<!-- entity_title -->
									<c:forEach items="${singleMap.get('reviewList') }" var="review">
										<div class="media">
											<div class="media-left">
												<a> </a>
											</div>
											<div class="media-body">
												<h2 class="media-heading">
													<a></a>
												</h2>
												用户id：${review.userId }&nbsp;&nbsp;${review.reviewDetails }
												<div class="entity_vote">
													<a href="#"><i class="fa fa-thumbs-o-up"
														aria-hidden="true"></i></a> <a href="#"><i
														class="fa fa-thumbs-o-down" aria-hidden="true"></i></a> <a
														href="#"><span class="reply_ic">Reply </span></a>
												</div>

											</div>
											<!-- media end -->
										</div>
									</c:forEach>
								</div>

								<!--Readers Comment-->

								<div class="widget_advertisement"></div>
								<!--Advertisement-->

								<div class="entity_comments">
									<div class="entity_inner__title header_black">
										<h2>添加评论</h2>
									</div>
									<!--Entity Title -->

									<div class="entity_comment_from">
										<form action="/News/NewsReviewServlet" method="get">
											<div class="form-group comment">
												<textarea class="form-control" id="inputComment"
													placeholder="内容" name="reviewDetails"></textarea>
											</div>
											<input type="hidden" name="newsId" value="${singleMap.get('news').newsId}">
											<button type="submit" class="btn btn-submit red">提交</button>
										</form>
									</div>
									<!--Entity 评论 From -->

								</div>
								<!--Entity 评论 -->

							</div>
							<!--Left Section-->

							<div class="col-md-4">
								<div class="widget">
									<div class="widget_title widget_black">
										<h2>
											<a>热门新闻</a>
										</h2>
									</div>
									<c:forEach
										items="${singleMap.get('queryRightNewsHeatNumList')}"
										var="news">
										<div class="media">
											<div class="media-left">
												<a href="/News/NewsSingleServlet?newsId=${news.newsId}"><img
													class="media-object" src="assets/img/news/${news.newsImg }"
													alt="Generic placeholder image"></a>
											</div>
											<div class="media-body">
												<h3 class="media-heading">
													<a href="/News/NewsSingleServlet?newsId=${news.newsId}"
														target="_self">${news.newsHeadline }</a>
												</h3>
												<span class="media-date"><a href="#">${news.newsDate }</a>,
													作者: <a href="#">${news.newsAuthor }</a></span>

												<div class="widget_article_social">
													<span> <a
														href="/News/NewsSingleServlet?newsId=${news.newsId}"
														target="_self"> <i class="fa fa-share-alt"></i>${news.newsHeat }
													</a> 分享
													</span> <span> <a
														href="/News/NewsSingleServlet?newsId=${news.newsId}"
														target="_self"><i class="fa fa-comments-o"></i>${news.newsReviewNum }</a>
														评论
													</span>
												</div>
											</div>
										</div>
									</c:forEach>
									<p class="widget_divider">
										<a href="category.jsp" target="_self">更多精彩新闻&nbsp;&raquo;</a>
									</p>
								</div>

								<!-- Advertisement -->


								<div class="widget hidden-xs m30">
									<img class="img-responsive widget_img"
										src="/News/assets/img/news01.png" alt="add_one" width="300px"
										height="250px" />
								</div>
								<!-- Reviews News -->

								<div class="widget hidden-xs m30">
									<img class="img-responsive widget_img"
										src="/News/assets/img/news01.png" alt="add_one" width="300px"
										height="250px" />
								</div>

								<div class="widget m30">
									<div class="widget_title widget_black">
										<h2>
											<a>评论最多</a>
										</h2>
									</div>
									<c:forEach items="${singleMap.get('queryNewsReviewNum')}"
										var="news">
										<div class="media">
											<div class="media-left">
												<a href="/News/NewsSingleServlet?newsId=${news.newsId}"><img
													class="media-object"
													src="/News/assets/img/news/${news.newsImg }"
													alt="Generic placeholder image"></a>
											</div>
											<div class="media-body">
												<h3 class="media-heading">
													<a href="/News/NewsSingleServlet?newsId=${news.newsId}"
														target="_self">${news.newsHeadline }</a>
												</h3>

												<div class="media_social">
													<span><i class="fa fa-comments-o"></i><a href="#">${news.newsReviewNum }</a>
														评论</span>
												</div>
											</div>
										</div>
									</c:forEach>
									<p class="widget_divider">
										<a href="category.jsp" target="_self">更多精彩新闻&nbsp;&nbsp;&raquo;
										</a>
									</p>
								</div>


								<!--Advertisement-->
							</div>
							<!--Right Section-->

						</div>
						<!-- row -->

					</div>
					<!-- container -->

				</section>
				<!-- Entity Section Wrapper -->
				<!-- Subscriber Section -->
				<!-- Subscriber Section -->
				<section id="footer_section" class="footer_section">
					<div class="footer_bottom_Section">
						<div class="container">
							<div class="row">
								<div class="footer">
									<div class="col-sm-3">
										<div class="social">
											<a class="icons-sm fb-ic"><i class="fa fa-facebook"></i></a>
											<!--Twitter-->
											<a class="icons-sm tw-ic"><i class="fa fa-twitter"></i></a>
											<!--Google +-->
											<a class="icons-sm inst-ic"><i class="fa fa-instagram">
											</i></a>
											<!--Linkedin-->
											<a class="icons-sm tmb-ic"><i class="fa fa-tumblr"> </i></a>
											<!--Pinterest-->
											<a class="icons-sm rss-ic"><i class="fa fa-rss"> </i></a>
										</div>
									</div>
									<div class="col-sm-6">
										<p>@科技视界新闻网</p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</section>
			</div>
			<!-- #content-wrapper -->

		</div>
		<!-- .offcanvas-pusher -->

		<a href="#" class="crunchify-top"><i class="fa fa-angle-up"
			aria-hidden="true"></i></a>


		<!-- .uc-mobile-menu -->

	</div>
	<!-- #main-wrapper -->
	<!-- jquery Core-->
	<script src="/News/assets/js/jquery-2.1.4.min.js"></script>
	<!-- Theme Script -->
	<script src="/News/assets/js/script.js"></script>
</body>
<script type="text/javascript">
	function getDayOfWeek(day) {
		return [ '周日', '周一', '周二', '周三', '周四', '周五', '周六' ][day];
	}
	function updateTime() {
		var now = new Date();
		var startDay = getDayOfWeek(now.getDay());
		$(".date").text(startDay);
		$(".time").text(now);
	}
	setInterval(updateTime, 1000);
	updateTime();
</script>
</html>